import 'package:api/pages/apps/changeDayAndLight/customscroll_demo_page.dart';
import 'package:api/pages/apps/changeDayAndLight/provide_config.dart';
import 'package:api/pages/apps/changeDayAndLight/theme_config.dart';
import 'package:flutter/material.dart';

void main() => runApp(ProvideConfig.init(child: MyApp()));

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ProvideConfig.connect<ThemeConfigModel>(
        builder: (context, child, ThemeConfigModel model) {
      // 每次通知数据刷新时，builder将会重新构建这个小部件
      return MaterialApp(
        title: "GGB",
        theme: model.defaultTheme,
        home: CustomScrollDemoPage(),
      );
    });
  }
}
